/*
 * Copyright (c) United Binary LLC.  All rights reserved.
 * 
 * This code is licensed under the MIT License
 * 
 * SEE: http://harnessit.codeplex.com/license
 * 
 */
using System;
using UnitedBinary.UnitTests.Framework;
using System.Windows.Forms;

namespace UnitTest
{
	[TestClass("A tester")]
	public class Bug89Tests 
	{
		private class TrueControl : UserControl 
		{
			public bool MyProperty 
			{
				get { return true; }
			}
		}

		private class TrueControl2 : UserControl 
		{
			public bool MyProperty 
			{
				get { return true; }
			}
		}
		private class TrueControl3 : UserControl 
		{
			public bool MyProperty 
			{
				get { return true; }
			}
		}

		private class TrueControl4 : UserControl 
		{
			public bool MyProperty 
			{
				get { return true; }
			}
		}

		private class TrueControl5 : UserControl 
		{
			public bool MyProperty 
			{
				get { return true; }
			}
		}

		[TestMethod("A method")]
		public void TestMethod(TestMethodRecord tmr) 
		{
			tmr.RunTest(new TrueControl().MyProperty, "Should be true blue 2.");
		}
	}

	public class Stacker
	{
		/// <summary>
		/// Test the creation of a LoanChannel object.
		/// </summary>
		[TestMethod("Create an object of type LoanChannel.")]
		public void testCreateLoanChannel(TestMethodRecord tmr)
		{
			Exception exception = new Exception();
 
			bool isSuccess = false;
 
			try
			{
				// Throws an exception if not instantiable based on constructor arg.
				//LoanChannel loanChannel = new LoanChannel("NETB2C");
				throw exception;

				// Made it this far with no exception, test is successful.
				//isSuccess = true;
			}
			catch(Exception e)
			{
				// Assign local exception e to exception scoped to method.
				exception = e;
			}
 
			// Get stack trace, if applicable, as string.
			string stackTrace = (exception.Message != "") ? " " + exception.ToString() : "";
 
			// Send test result to the test runner.
			tmr.RunTest(isSuccess, "LoanChannel creation." + stackTrace);
		}
	}

}
